package cn.com.dycc.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.apache.commons.codec.binary.Base64;
/**
 * MD5瀵嗙爜鍔犲瘑宸ュ叿绫�
 * Description: 
 * Author: linfangan
 * Version: 1.0
 * Create Date Time: 2017骞�鏈�4鏃�涓嬪崍3:59:13.
 * Update Date Time: 
 * @see
 */
public class NoteUtil {
	
	public static String md5(String str){
		try {
			MessageDigest md=MessageDigest.getInstance("MD5");
			byte[]output=md.digest(str.getBytes());
			String ret=Base64.encodeBase64String(output);
			return ret;
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
		return str;
	}

}
